package com.dyw.ssmp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dyw.ssmp.entity.Book;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author Devil
 * @create 2022-01-23-20:30
 */
@Mapper
@SuppressWarnings("all")
public interface BookMapper extends BaseMapper<Book> {
    @Select("select * from tbl_book where id = #{id}")
    Book selectById(int id);
    @Insert("insert into tbl_book values(#{id},#{type},#{name},#{description} )")
    void insertBook(Book book);
}
